<template>
  <div class="swiper-container songs">
    <div class="swiper-wrapper">
      <slot></slot>
    </div>
    <!-- 如果需要分页器 -->
    <div class="swiper-pagination"></div>
  </div>
</template>
<script>
import Swiper from 'swiper/bundle'
import 'swiper/swiper-bundle.css'
export default {
  props: {
    loop: {
      type: Boolean,
      default: true
    }
  },
  mounted () {
    new Swiper('.songs', {
      pagination: {
        el: '.swiper-pagination'
      },
      loop: this.loop,
      autoplay: true
    })
  },
  components: {
    Swiper
  }
}
</script>
